package mystruts;

import com.opensymphony.xwork2.ActionSupport;

public class testAction extends ActionSupport {
	
	public String execute() throws Exception {
		this.LOG.debug("debug~~ ");
		this.LOG.info("info~~");
        System.out.println("testAction.execute...");
        System.out.println("username:"+this.getUsername());
        System.out.println("password:"+this.getPassword());
        String ss="";
        if((this.getUsername()==null)&&(this.getPassword()==null)){
        	this.setMeg("wellcome");
        	ss="testlogin";
        }else if("Lin".equals(this.getUsername())&&("1111".equals(this.getPassword()))){
        	this.setMeg("");
        	ss="ss";
        }else{
        	this.setMeg("帳號或密碼錯誤...");
        	ss="testlogin";
        }
        return ss;        
    }	
	String meg;
	String username;
	String password;
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	public String getMeg() {
		return meg;
	}
	public void setMeg(String meg) {
		this.meg = meg;
	}
}
